<?php 

//----------------------------------------------------Sidebar

if ( function_exists('register_sidebar') )
    register_sidebar(array(
        'before_widget' => '<div id="%1$s" class="dbx-box %2$s">',
        'after_widget' => '</div><div class="box_sidebar_bottom"></div></div>',
        'before_title' => '<h5 class="dbx-handle dbxsidebar">',
        'after_title' => '</h5><div class="dbx-content  dbxsidebar_content">',
    ));
	
register_sidebar(array('name'=>'Sidebar-Standard',
        'before_widget' => '<div id="%1$s" class="dbx-box %2$s">',
        'after_widget' => '</div><div class="box_sidebar_bottom"></div></div>',
        'before_title' => '<h5 class="dbx-handle dbxsidebar">',
        'after_title' => '</h5><div class="dbx-content  dbxsidebar_content">',
		));
	
register_sidebar(array('name'=>'Boxwidget_1',
		'before_widget' => '<div id="boxwidget_one">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
		
register_sidebar(array('name'=>'Boxwidget_2',
		'before_widget' => '<div id="boxwidget_two">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
				
register_sidebar(array('name'=>'Boxwidget_3',
		'before_widget' => '<div id="boxwidget_three">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
				
		
register_sidebar(array('name'=>'Boxwidget_4',
		'before_widget' => '<div id="boxwidget_four">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
				
		
register_sidebar(array('name'=>'Boxwidget_5',
		'before_widget' => '<div id="boxwidget_five">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
		
register_sidebar(array('name'=>'Boxwidget_6',
		'before_widget' => '<div id="boxwidget_six">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
		
register_sidebar(array('name'=>'Boxwidget_7',
		'before_widget' => '<div id="boxwidget_seven">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
				





register_sidebar(array('name'=>'Boxwidget_1_2',
		'before_widget' => '<div id="boxwidget_one">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
		
register_sidebar(array('name'=>'Boxwidget_2_2',
		'before_widget' => '<div id="boxwidget_two">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
				
register_sidebar(array('name'=>'Boxwidget_3_2',
		'before_widget' => '<div id="boxwidget_three">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
				
		
register_sidebar(array('name'=>'Boxwidget_4_2',
		'before_widget' => '<div id="boxwidget_four">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
				
		
register_sidebar(array('name'=>'Boxwidget_5_2',
		'before_widget' => '<div id="boxwidget_five">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
		
register_sidebar(array('name'=>'Boxwidget_6_2',
		'before_widget' => '<div id="boxwidget_six">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
		
register_sidebar(array('name'=>'Boxwidget_7_2',
		'before_widget' => '<div id="boxwidget_seven">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
		
		
		
		
		
		
		

register_sidebar(array('name'=>'Boxwidget_1_3',
		'before_widget' => '<div id="boxwidget_one">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
		
register_sidebar(array('name'=>'Boxwidget_2_3',
		'before_widget' => '<div id="boxwidget_two">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
				
register_sidebar(array('name'=>'Boxwidget_3_3',
		'before_widget' => '<div id="boxwidget_three">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
				
		
register_sidebar(array('name'=>'Boxwidget_4_3',
		'before_widget' => '<div id="boxwidget_four">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
				
		
register_sidebar(array('name'=>'Boxwidget_5_3',
		'before_widget' => '<div id="boxwidget_five">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
		
register_sidebar(array('name'=>'Boxwidget_6_3',
		'before_widget' => '<div id="boxwidget_six">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
		
register_sidebar(array('name'=>'Boxwidget_7_3',
		'before_widget' => '<div id="boxwidget_seven">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
		
		
		
		
		
		
		
		
		
		
		
		
register_sidebar(array('name'=>'Boxwidget_1_4',
		'before_widget' => '<div id="boxwidget_one">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
		
register_sidebar(array('name'=>'Boxwidget_2_4',
		'before_widget' => '<div id="boxwidget_two">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
				
register_sidebar(array('name'=>'Boxwidget_3_4',
		'before_widget' => '<div id="boxwidget_three">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
				
		
register_sidebar(array('name'=>'Boxwidget_4_4',
		'before_widget' => '<div id="boxwidget_four">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
				
		
register_sidebar(array('name'=>'Boxwidget_5_4',
		'before_widget' => '<div id="boxwidget_five">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
		
register_sidebar(array('name'=>'Boxwidget_6_4',
		'before_widget' => '<div id="boxwidget_six">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
		
register_sidebar(array('name'=>'Boxwidget_7_4',
		'before_widget' => '<div id="boxwidget_seven">',
		'after_widget' => '</div>',
		'before_title' => '<div id="deleteheader">',
		'after_title' => '</div>',
		));
//----------------------------------------------------Excerpt
	
function improved_trim_excerpt($text) {
	global $post;
	if ( '' == $text ) {
		$text = get_the_content('');
		$text = apply_filters('the_content', $text);
		$text = str_replace(']]>', ']]&gt;', $text);
		$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);
		$text = strip_tags($text, '<p>');
		$excerpt_length = 35;
		$words = explode(' ', $text, $excerpt_length + 1);
		if (count($words)> $excerpt_length) {
			array_pop($words);
			array_push($words, '');
			$text = implode(' ', $words);
		}
	}
	return $text;
}
	
remove_filter('get_the_excerpt', 'wp_trim_excerpt');
add_filter('get_the_excerpt', 'improved_trim_excerpt');	




add_filter('the_content', 'mmwrel_replace', 12);
add_filter('get_comment_text', 'mmwrel_replace');
function mmwrel_replace ($content)
{   global $post;
	$pattern = "/<a(.*?)href=('|\")([^>]*).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>(.*?)<\/a>/i";
    $replacement = '<a$1href=$2$3.$4$5 rel="lightbox['.$post->ID.']"$6>$7</a>';
    $content = preg_replace($pattern, $replacement, $content);
    return $content;
}
 

function one_comment($comment, $args, $depth) { 
$GLOBALS['comment'] = $comment; ?>  
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">  
	<div class="comment_arrow"></div>
	
	 <div class="comment_inner">
	 
		<div id="comment-<?php comment_ID(); ?>">  
			<div class="comment_frame"> 
			 
				<div class="comment_avatar"><?php echo get_avatar($comment,$size='46',$default='<path_to_url>' ); ?>
				</div>
				
				<div  class="comment_author_top">
				
							<p class="comment_author_say"><?php printf(__('<cite class="comment_title">%s says:</cite>'), get_comment_author_link()) ?>
							</p>
							
							<p class="comment_date"><a href="<?php echo htmlspecialchars(get_comment_link( $comment->comment_ID )) ?>">  <?php printf(__('%1$s at %2$s '), get_comment_date(),get_comment_time()) ?></a>
							</p>  
				
				</div>
				  
				<div  class="comment_data_right"><?php edit_comment_link(__(' Edit |'),'  ','') ?>   <?php comment_reply_link(array_merge( $args, array('reply_text' => ' Reply', 'add_below' =>$add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?>
				</div>
				
				<div class="clear">
				</div>
			
			</div> 
			 
			
			<?php if ($comment->comment_approved == '0') : ?>  
			<em><?php _e('Your comment is awaiting moderation.') ?></em>  
			<br />  
			<?php endif; ?>  
	  	  
			<div class="comment_text"><?php comment_text() ?>
			</div> 
			<?php if($args['max_depth']!=$depth) { ?>  
			<?php } ?>  
		  </div> 
		</div>


<?php  
}  

function moocoom_inc() {
    $url_base = get_bloginfo('template_directory');
	if ( $_GET['page'] == basename(__FILE__) ) { 
	echo "<script src=\"http://jqueryui.com/latest/jquery-1.3.2.js\" type=\"text/javascript\"></script>\n";
	echo "<script src=\"$url_base/admin/jquery.colorbox.js\" type=\"text/javascript\"></script>\n";
	echo "<link rel='stylesheet' href=\"$url_base/admin/style.css\"/>\n";
	echo "<script src=\"$url_base/admin/tabs.js\" type=\"text/javascript\"></script>\n";
	echo "<script type=\"text/javascript\"> $(document).ready(function(){ $(\".iframe\").colorbox({width:\"80%\", height:\"80%\", iframe:true});});</script>\n";

	} 
  
}
add_action('admin_head', 'moocoom_inc');

//---------------------------------------------------------------------------------------------------------------------Settings
//---------------------------------------------------------------------------------------------------------------------Settings
//---------------------------------------------------------------------------------------------------------------------Settings
//---------------------------------------------------------------------------------------------------------------------Settings

$themename = "Exehill";
$shortname = "exehill";
$options = array (

//--------------------------------------------------------- TAB 1 --------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------------------




	array(   "name" => "Homepage Settings",
         "type" => "tab1"),		

	 array(   "name" => "Homepage Settings",
      	"type" => "seperator_header"),	
		
	 array(   "name" => "Homepage Settings",
      	"type" => "box_desc"),	
		
//---------------------------------------------POS 1

array(  "name" => "1",
        "id" => $shortname."_box_name_1",
        "std" => "",
        "type" => "text_start_head"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_custom_1",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_count_1",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box_private_1",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_header_type_1",
        "std" => "Slider1",
		"options" => array("Slider1", "Slider2", "Slider3", "Quad", "Slug"),
        "type" => "select_line_end"),
		

		
//---------------------------------------------POS 2

array(  "name" => "2",
        "id" => $shortname."_box_name_2",
        "std" => "",
        "type" => "text_start_head"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_custom_2",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_count_2",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box_private_2",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_header_type_2",
        "std" => "Slider1",
		"options" => array("Slider1", "Slider2", "Slider3", "Quad", "Slug"),
        "type" => "select_line_end"),


		
//---------------------------------------------POS 3

array(  "name" => "3",
        "id" => $shortname."_box_name_3",
        "std" => "",
        "type" => "text_start_head"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_custom_3",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_count_3",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box_private_3",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_header_type_3",
        "std" => "Slider1",
		"options" => array("Slider1", "Slider2", "Slider3", "Quad", "Slug"),
        "type" => "select_line_end"),

		
//---------------------------------------------POS 4

array(  "name" => "4",
        "id" => $shortname."_box_name_4",
        "std" => "",
        "type" => "text_start_head"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_custom_4",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_count_4",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box_private_4",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_header_type_4",
        "std" => "Slider1",
		"options" => array("Slider1", "Slider2", "Slider3", "Quad", "Slug"),
        "type" => "select_line_end"),

		 array(   "name" => "Homepage Settings",
         "type" => "seperator_content"),	
		 
	 array(   "name" => "Homepage Settings",
      	"type" => "box_desc"),	

//---------------------------------------------POS 5

array(  "name" => "1",
        "id" => $shortname."_box_name_5",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_custom_5",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_count_5",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box_private_5",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box_type_5",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),

		
//---------------------------------------------POS 6

array(  "name" => "2",
        "id" => $shortname."_box_name_6",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_custom_6",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_count_6",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box_private_6",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box_type_6",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 7

array(  "name" => "3",
        "id" => $shortname."_box_name_7",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_custom_7",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_count_7",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box_private_7",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box_type_7",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 8

array(  "name" => "4",
        "id" => $shortname."_box_name_8",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_custom_8",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_count_8",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box_private_8",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box_type_8",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 9

array(  "name" => "5",
        "id" => $shortname."_box_name_9",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_custom_9",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_count_9",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box_private_9",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box_type_9",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 10

array(  "name" => "6",
        "id" => $shortname."_box_name_10",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_custom_10",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_count_10",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box_private_10",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box_type_10",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 11

array(  "name" => "7",
        "id" => $shortname."_box_name_11",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_custom_11",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box_count_11",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box_private_11",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box_type_11",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		


array(   "name" => "Homepage Settings",
         "type" => "tabclose"),





//------------------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------------------


	array(   "name" => "Homepage Settings",
         "type" => "tab2"),		

	 array(   "name" => "Homepage Settings",
      	"type" => "seperator_header"),	
		
	 array(   "name" => "Homepage Settings",
      	"type" => "box_desc"),	
		
//---------------------------------------------POS 1

array(  "name" => "1",
        "id" => $shortname."_box2_name_1",
        "std" => "",
        "type" => "text_start_head"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_custom_1",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_count_1",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box2_private_1",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_header2_type_1",
        "std" => "Slider1",
		"options" => array("Slider1", "Slider2", "Slider3", "Quad", "Slug"),
        "type" => "select_line_end"),
		

		
//---------------------------------------------POS 2

array(  "name" => "2",
        "id" => $shortname."_box2_name_2",
        "std" => "",
        "type" => "text_start_head"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_custom_2",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_count_2",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box2_private_2",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_header2_type_2",
        "std" => "Slider1",
		"options" => array("Slider1", "Slider2", "Slider3", "Quad", "Slug"),
        "type" => "select_line_end"),


		
//---------------------------------------------POS 3

array(  "name" => "3",
        "id" => $shortname."_box2_name_3",
        "std" => "",
        "type" => "text_start_head"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_custom_3",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_count_3",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box2_private_3",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_header2_type_3",
        "std" => "Slider1",
		"options" => array("Slider1", "Slider2", "Slider3", "Quad", "Slug"),
        "type" => "select_line_end"),

		
//---------------------------------------------POS 4

array(  "name" => "4",
        "id" => $shortname."_box2_name_4",
        "std" => "",
        "type" => "text_start_head"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_custom_4",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_count_4",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box2_private_4",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_header2_type_4",
        "std" => "Slider1",
		"options" => array("Slider1", "Slider2", "Slider3", "Quad", "Slug"),
        "type" => "select_line_end"),

		 array(   "name" => "Homepage Settings",
         "type" => "seperator_content"),	
		 
	 array(   "name" => "Homepage Settings",
      	"type" => "box_desc"),	

//---------------------------------------------POS 5

array(  "name" => "1",
        "id" => $shortname."_box2_name_5",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_custom_5",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_count_5",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box2_private_5",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box2_type_5",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),

		
//---------------------------------------------POS 6

array(  "name" => "2",
        "id" => $shortname."_box2_name_6",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_custom_6",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_count_6",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box2_private_6",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box2_type_6",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 7

array(  "name" => "3",
        "id" => $shortname."_box2_name_7",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_custom_7",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_count_7",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box2_private_7",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box2_type_7",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 8

array(  "name" => "4",
        "id" => $shortname."_box2_name_8",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_custom_8",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_count_8",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box2_private_8",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box2_type_8",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 9

array(  "name" => "5",
        "id" => $shortname."_box2_name_9",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_custom_9",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_count_9",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box2_private_9",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box2_type_9",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 10

array(  "name" => "6",
        "id" => $shortname."_box2_name_10",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_custom_10",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_count_10",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box2_private_10",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box2_type_10",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 11

array(  "name" => "7",
        "id" => $shortname."_box2_name_11",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_custom_11",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box2_count_11",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box2_private_11",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box2_type_11",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		


array(   "name" => "Homepage Settings",
         "type" => "tabclose"),

//--------------------------------------------------------- TAB 3 --------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------------------



	array(   "name" => "Homepage Settings",
         "type" => "tab3"),		

	 array(   "name" => "Homepage Settings",
      	"type" => "seperator_header"),	
		
	 array(   "name" => "Homepage Settings",
      	"type" => "box_desc"),	
		
//---------------------------------------------POS 1

array(  "name" => "1",
        "id" => $shortname."_box3_name_1",
        "std" => "",
        "type" => "text_start_head"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_custom_1",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_count_1",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box3_private_1",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_header3_type_1",
        "std" => "Slider1",
		"options" => array("Slider1", "Slider2", "Slider3", "Quad", "Slug"),
        "type" => "select_line_end"),
		

		
//---------------------------------------------POS 2

array(  "name" => "2",
        "id" => $shortname."_box3_name_2",
        "std" => "",
        "type" => "text_start_head"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_custom_2",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_count_2",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box3_private_2",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_header3_type_2",
        "std" => "Slider1",
		"options" => array("Slider1", "Slider2", "Slider3", "Quad", "Slug"),
        "type" => "select_line_end"),


		
//---------------------------------------------POS 3

array(  "name" => "3",
        "id" => $shortname."_box3_name_3",
        "std" => "",
        "type" => "text_start_head"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_custom_3",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_count_3",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box3_private_3",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_header3_type_3",
        "std" => "Slider1",
		"options" => array("Slider1", "Slider2", "Slider3", "Quad", "Slug"),
        "type" => "select_line_end"),

		
//---------------------------------------------POS 4

array(  "name" => "4",
        "id" => $shortname."_box3_name_4",
        "std" => "",
        "type" => "text_start_head"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_custom_4",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_count_4",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box3_private_4",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_header3_type_4",
        "std" => "Slider1",
		"options" => array("Slider1", "Slider2", "Slider3", "Quad", "Slug"),
        "type" => "select_line_end"),

		 array(   "name" => "Homepage Settings",
         "type" => "seperator_content"),	
		 
	 array(   "name" => "Homepage Settings",
      	"type" => "box_desc"),	

//---------------------------------------------POS 5

array(  "name" => "1",
        "id" => $shortname."_box3_name_5",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_custom_5",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_count_5",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box3_private_5",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box3_type_5",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),

		
//---------------------------------------------POS 6

array(  "name" => "2",
        "id" => $shortname."_box3_name_6",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_custom_6",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_count_6",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box3_private_6",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box3_type_6",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 7

array(  "name" => "3",
        "id" => $shortname."_box3_name_7",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_custom_7",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_count_7",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box3_private_7",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box3_type_7",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 8

array(  "name" => "4",
        "id" => $shortname."_box3_name_8",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_custom_8",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_count_8",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box3_private_8",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box3_type_8",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 9

array(  "name" => "5",
        "id" => $shortname."_box3_name_9",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_custom_9",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_count_9",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box3_private_9",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box3_type_9",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 10

array(  "name" => "6",
        "id" => $shortname."_box3_name_10",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_custom_10",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_count_10",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box3_private_10",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box3_type_10",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 11

array(  "name" => "7",
        "id" => $shortname."_box3_name_11",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_custom_11",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box3_count_11",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box3_private_11",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box3_type_11",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		


array(   "name" => "Homepage Settings",
         "type" => "tabclose"),
	 
		 
//--------------------------------------------------------- TAB 4 --------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------------------



	array(   "name" => "Homepage Settings",
         "type" => "tab4"),		

	 array(   "name" => "Homepage Settings",
      	"type" => "seperator_header"),	
		
	 array(   "name" => "Homepage Settings",
      	"type" => "box_desc"),	
		
//---------------------------------------------POS 1

array(  "name" => "1",
        "id" => $shortname."_box4_name_1",
        "std" => "",
        "type" => "text_start_head"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_custom_1",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_count_1",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box4_private_1",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_header4_type_1",
        "std" => "Slider1",
		"options" => array("Slider1", "Slider2", "Slider3", "Quad", "Slug"),
        "type" => "select_line_end"),
		

		
//---------------------------------------------POS 2

array(  "name" => "2",
        "id" => $shortname."_box4_name_2",
        "std" => "",
        "type" => "text_start_head"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_custom_2",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_count_2",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box4_private_2",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_header4_type_2",
        "std" => "Slider1",
		"options" => array("Slider1", "Slider2", "Slider3", "Quad", "Slug"),
        "type" => "select_line_end"),


		
//---------------------------------------------POS 3

array(  "name" => "3",
        "id" => $shortname."_box4_name_3",
        "std" => "",
        "type" => "text_start_head"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_custom_3",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_count_3",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box4_private_3",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_header4_type_3",
        "std" => "Slider1",
		"options" => array("Slider1", "Slider2", "Slider3", "Quad", "Slug"),
        "type" => "select_line_end"),

		
//---------------------------------------------POS 4

array(  "name" => "4",
        "id" => $shortname."_box4_name_4",
        "std" => "",
        "type" => "text_start_head"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_custom_4",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_count_4",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box4_private_4",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_header4_type_4",
        "std" => "Slider1",
		"options" => array("Slider1", "Slider2", "Slider3", "Quad", "Slug"),
        "type" => "select_line_end"),

		 array(   "name" => "Homepage Settings",
         "type" => "seperator_content"),	
		 
	 array(   "name" => "Homepage Settings",
      	"type" => "box_desc"),	

//---------------------------------------------POS 5

array(  "name" => "1",
        "id" => $shortname."_box4_name_5",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_custom_5",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_count_5",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box4_private_5",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box4_type_5",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),

		
//---------------------------------------------POS 6

array(  "name" => "2",
        "id" => $shortname."_box4_name_6",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_custom_6",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_count_6",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box4_private_6",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box4_type_6",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 7

array(  "name" => "3",
        "id" => $shortname."_box4_name_7",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_custom_7",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_count_7",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box4_private_7",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box4_type_7",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 8

array(  "name" => "4",
        "id" => $shortname."_box4_name_8",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_custom_8",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_count_8",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box4_private_8",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box4_type_8",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 9

array(  "name" => "5",
        "id" => $shortname."_box4_name_9",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_custom_9",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_count_9",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box4_private_9",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box4_type_9",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 10

array(  "name" => "6",
        "id" => $shortname."_box4_name_10",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_custom_10",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_count_10",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box4_private_10",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box4_type_10",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		
//---------------------------------------------POS 11

array(  "name" => "7",
        "id" => $shortname."_box4_name_11",
        "std" => "",
        "type" => "text_start"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_custom_11",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "desc" => "",
        "id" => $shortname."_box4_count_11",
        "std" => "",
        "type" => "text_line"),
		
array(  "name" => "",
        "id" => $shortname."_box4_private_11",
        "std" => "False",
		"options" => array("False", "True"),
        "type" => "select_line"),
		
		
array(  "name" => "",
        "id" => $shortname."_box4_type_11",
        "std" => "Blogbox",
		"options" => array("Blogbox", "Featuredbox", "Imagebox", "Postlist", "Videobox", "Widget"),
        "type" => "select_line_end"),
		


array(   "name" => "Homepage Settings",
         "type" => "tabclose"),
	 



//--------------------------------------------------------- TAB 5 --------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------------------

array(   "name" => "Homepage Settings",
         "type" => "tab5"),


array(  "name" => "Logo",
        "desc" => "http://yourdomain.com/path/to/image.png (180px x 70px)",
        "id" => $shortname."_theme_logo",
        "std" => "",
        "type" => "text"),
		
array(  "name" => "Google Analytics",
        "desc" => "<a href=\"http://www.google.com/analytics/\" title=\"Get an ID\">Google Analytics account ID (UA-1234567-0)</a>",
        "id" => $shortname."_google_analytics",
        "std" => "",
        "type" => "text"),
		
		
array(  "name" => "Footer",
        "desc" => "Add some text or HTML to footer",
        "id" => $shortname."_footer_text",
        "std" => "",
        "type" => "textarea"),
		
array(   "name" => "Homepage Settings",
         "type" => "tabclose"),

array(   "name" => "Homepage Settings",
         "type" => "tabsclose"),

);?><?php
function mytheme_add_admin() {

    global $themename, $shortname, $options;

    if ( $_GET['page'] == basename(__FILE__) ) {

        if ( 'save' == $_REQUEST['action'] ) {

                foreach ($options as $value) {
                    update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }

                foreach ($options as $value) {
                    if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ]  ); } else { delete_option( $value['id'] ); } }

                header("Location: themes.php?page=functions.php&saved=true");
                die;

        } else if( 'reset' == $_REQUEST['action'] ) {

            foreach ($options as $value) {
                delete_option( $value['id'] ); }

            header("Location: themes.php?page=functions.php&reset=true");
            die;

        }
    }

    add_theme_page($themename." Options", "".$themename." Options", 'edit_themes', basename(__FILE__), 'mytheme_admin');

}

function mytheme_admin() {

    global $themename, $shortname, $options;

    if ( $_REQUEST['saved'] ) echo '<div id="message" class="savemessage"><strong>'.$themename.' settings saved.</strong></div>';
    if ( $_REQUEST['reset'] ) echo '<div id="message" class="savemessage fade"><strong>'.$themename.' settings reset.</strong></div>';

?>
<div id="container">
  <div id="tabs">
     <ul>
      <li><a href="#tab-1">Index</a></li>
      <li><a href="#tab-2">Box Page 1</a></li>
      <li><a href="#tab-3">Box Page 2</a></li>
      <li><a href="#tab-4">Box Page 3</a></li>
	  <li><a href="#tab-5">General Setting</a></li>

    </ul>

<form method="post">

<?php foreach ($options as $value) {

switch ( $value['type'] ) {

case "open":
?>

<?php break;

case "close":
?>




<?php break;

case "tab1":
?>

<div id="tab-1">

<?php break;

case "tab2":
?>

<div id="tab-2">

<?php break;

case "tab3":
?>

<div id="tab-3">

<?php break;

case "tab4":
?>

<div id="tab-4">

<?php break;

case "tab5":
?>

<div id="tab-5">




<?php break;

case "tabsclose":
?>

</div></div>


<?php break;

case "tabclose":
?>

</div>






<?php break;

case 'text':
?>
<p class="ptag"><strong><?php echo $value['name']; ?></strong></p>
<p class="ptag"><input style="width:200px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>
<p class="ptag_end"><small><?php echo $value['desc']; ?></small></p>
<p class="seperator"></p>


<?php
break;

case 'textarea':
?>

<p class="ptag"><strong><?php echo $value['name']; ?></strong></p>
<p class="ptag"><textarea name="<?php echo $value['id']; ?>" style="width:400px; height:200px;" type="<?php echo $value['type']; ?>" cols="" rows=""><?php if ( get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?></textarea></p>
<p class="ptag_end"><small><?php echo $value['desc']; ?></small></p>
<p class="seperator"></p>


<?php
break;

case 'select':
?>

<p class="ptag"><strong><?php echo $value['name']; ?></strong></p>
<p class="ptag"><select style="width:140px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>"><?php foreach ($value['options'] as $option) { ?><option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option><?php } ?></select></p>
<p class="ptag_end"><small><?php echo $value['desc']; ?></small></p>
<p class="seperator"></p>

<?php
break;

case 'selectdisable':
?>

<p class="ptag"><strong><?php echo $value['name']; ?></strong></p>
<p class="ptag"><select style="width:140px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>"><?php foreach ($value['options'] as $option) { ?><option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option><?php } ?></select></p>
<p class="ptag_end"><small><?php echo $value['desc']; ?></small></p>
<p class="seperator"></p>


<?php
break;

case 'select_line':
?>

<span class="ptag"><select style="width:140px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>"><?php foreach ($value['options'] as $option) { ?><option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option><?php } ?></select></span>

<?php
break;

case 'select_line_end':
?>

<span class="ptag"><select style="width:140px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>"><?php foreach ($value['options'] as $option) { ?><option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option><?php } ?></select></span>
<p class="seperator"></p>

<?php
break;

case 'seperator_header':
?>

<span class="ptag"><h3>Header Boxes <a class="iframe" href="http://exehill.com/e2doc.pdf"> [HELP] </a></h3></span>
<p class="seperator"></p>

<?php
break;

case 'seperator_content':
?>

<span class="ptag"><h3>Content Boxes <a class="iframe" href="http://exehill.com/e2doc.pdf"> [HELP] </a></h3></span>
<p class="seperator"></p>


<?php break;

case 'text_line':
?>
<span class="ptag"><strong><input style="width:100px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></strong></span>

<?php break;

case 'box_desc':
?>
<span class="ptag1">Pos</span> <span class="ptag2">Headline</span> <span class="ptag3">Category</span> <span class="ptag4">Count</span> <span class="ptag5">Private</span> <span class="ptag6">Type</span>
<p class="seperator"></p>

<?php break;

case 'text_start':
?>

<span class="ptag" style="width:150px; "><strong style="color: #0099CC; padding-right:30px; "><?php echo $value['name']; ?></strong></span>
<span class="ptag"><strong><input style="width:200px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></strong></span>

<?php break;

case 'text_start_head':
?>

<span class="ptag" style="width:150px; "><strong style="color:#CCCC00;  padding-right:30px; "><?php echo $value['name']; ?></strong></span>
<span class="ptag"><strong><input style="width:200px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></strong></span>

<?php
break;

case "checkbox":
?>
    <tr>
    <td width="20%" rowspan="2" valign="middle"><strong><?php echo $value['name']; ?></strong></td>
        <td width="80%"><? if(get_settings($value['id'])){ $checked = "checked=\"checked\""; }else{ $checked = ""; } ?>
                <input type="checkbox" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="true" <?php echo $checked; ?> />
      </td>
    </tr>

    <tr>
        <td><small><?php echo $value['desc']; ?></small></td>
   </tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px solid #E4E4E4;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

<?php         break;

}
}
?>

<p class="submit">
<input name="save" type="submit" value="Save changes" />
<input type="hidden" name="action" value="save" />
</p>
</form>
<form method="post">
<p class="submit">
<input name="reset" type="submit" value="Reset" />
<input type="hidden" name="action" value="reset" />
</p>
</form>

<?php
}add_action('admin_menu', 'mytheme_add_admin');?>